package org.example.types.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum GroupByOrderEnumVO {

    PROGRESS(0,"拼单中"),
    COMPLETE(1,"完成"),
    FAIL(2,"失败"),
    ;

   private  Integer code;
   private  String info;


    public static GroupByOrderEnumVO valueOf(Integer code)
    {
        switch (code)
        {
            case 0:
                return PROGRESS;
            case 1:
                return COMPLETE;
            case 2:
                return FAIL;

        }
        throw new RuntimeException("ERR CODE NOT EXIST!!!");

    }

}
